SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE view [dbo].[inscripcionesrepetidas]
as 
SELECT DISTINCT DOCUMENTO, COUNT(*)as cantidad FROM VWLINSCRIPCIONES WHERE ANIOLECTIVO = 2010 GROUP BY DOCUMENTO HAVING COUNT(*) > 1

GO
